<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
#dibu {
	float: left;
	width: 100%;
	height: 5%;
	border: solid 0px;
}

#left {
	float: left;
	border: solid 1px;
	width: 75%;
	height: 800px;
	overflow: scroll;
}

#right {
	float: right;
	border: solid 1px;
	width: 24%;
	height: 800px;
}

#img {
	border: 1px solid;
	width: 50%;
	height: 200px;
	margin-left: 25%;
	margin-top: 10%;
}

#maodian {
	border: 0px solid;
	width: 80%;
	height: 400px;
	margin-left: 13%;
	margin-top: 18%;
	font-size: 30px;
	padding-left: 3%;
}

a {
	text-decoration: none;
	margin-left: 10px;
}

#time {
	border: 1px solid;
	width: 50%;
	height: 50px;
	margin-left: 25%;
}

#time p {
	margin-left: 34%;
	margin-top: 0px;
	margin-bottom: 0px;
}

#time2 {
	border: 0px solid;
	
	height: 28px;
	padding-left: 34%;
}

#time2 p {
	margin-left: 28%;
}
#leftin{
	
	float:right;
	width:95%;
	
}
#leftin .jiaojuan{
	width: 200px;
	padding:100px;
}
</style>
<script src="js/jquery-2.1.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
		var hh = 2
		var mm = 0
		var ss = 0
	function retime() {
		var h = 2
		var m = 0
		var s = 0
		

			if (ss > 0) {
				ss = ss - 1
			} else {
				if(hh<=0&&mm<=0){
					document.getElementByID('tm').submit();
				}
				mm=mm-1
				ss = 59
				
			}
			if (mm < 0) {
				mm = 59
				hh=hh - 1
				
				
			}

			h = checkTime(hh);
			m = checkTime(mm)
			s = checkTime(ss)
			document.getElementById('time2').innerHTML = h + ":" + m + ":" + s
			
			t=setTimeout('retime()', 1000)
			
		
		function checkTime(i) {
			if (i < 10) {
				i = "0" + i
			}
			return i
		}
		
	}
	
</script>
</head>
<body onload="retime()">
	<div id="bd">
		<div id="head">
			<iframe src='admin/message.jsp' frameborder='0' scrolling="no"
				width='100%' height='50px' name='mykj'></iframe>
		</div>
		<div id="content">
			<div id="left">
				<div id="leftin">
				<c:set var="i"	value="0"></c:set>
				<form action="xiewanjiaojuan" method="post" name="tm">
				<c:forEach var="topc" items="${list }">
			<p id='${i+1}'>${i+1 } . ${topc.topic_content }</p>
				<input type="hidden" name="id${i}" value="${topc.topic_id}">	
				<c:set var="i"	value="${i+1 }"></c:set>
							
					 			
					<input type="hidden" value="${i }" name="topcid">
					A.<input type="radio" name="op${i}" value="A"> 
					B.<input type="radio" name="op${i}" value="B"> 
					C.<input type="radio" name="op${i}" value="C"> 
					D.<input type="radio" name="op${i}" value="D"> 
								
					 	
				<br/><br/><br/><br/><br/><br/>
				</c:forEach>	
				<input type="submit" value="交卷"  name="jiaojuan" style="height:50px;width:100px;float:right;margin-right:50%;"/>
				</form>	
				
					<br/><br/><br/><br/>
					
				
				</div>		
			</div>
			<div id="right">
				<div id="righttop">
					<div id="img">
						<img alt="图被吃了" src="resources/tx.jpg" width="100%">
					</div>
					<div id="time">
						<p>剩余时间</p>
						<div id=time2>
							
						</div>
					</div>
					<div id="maodian">
						<c:forEach var="i" begin="0" end="49" step="1">
							<c:set var="str" value="00${i+1}"></c:set>
							<a href='#${i+1 }'> 
							<c:out
									value="${fn:substring(str,fn:length(str)-2,fn:length(str))}">
							</c:out>
							</a>
							<c:choose>
								<c:when test="${(i+1)%5==0}">
									<br />
								</c:when>
							</c:choose>
						</c:forEach>
					</div>
				</div>
				<div id="rightdown"></div>
			</div>
		</div>
		<div id="dibu">版权声明   made by Jack</div>
	</div>
</body>
</html>